package com.spc.car.data.service.project;

import com.spc.car.data.domain.project.vo.ProjectMemberVO;
import com.spc.car.data.domain.project.vo.UserForAssignVO;
import com.spc.car.data.entity.project.ProjectTeam;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.validation.constraints.NotBlank;
import java.util.List;


/**
 * <p>
 * 项目团队 服务类
 * </p>
 *
 * @author 
 * @since 2020-03-31
 */
public interface ProjectTeamService extends IService<ProjectTeam> {

    /**
     * 删除项目团队成员
     * @param code
     * @param userAccount
     */
    int removeMember(String code,String userAccount);

    /**
     * 删除项目团队
     * @param code
     * @return
     */
    int removeProjectTeam(String code);

    /**
     * 更新项目团队成员
     * @param projectTeam
     * @return
     */
    int updateProjectTeam(ProjectTeam projectTeam);

    /**
     * 获取任务执行人
     * @param projectTenderingCode  招标项目编号
     * @param taskKey  任务标识
     * @return
     */
    List<String> listAssignee(String projectTenderingCode, String taskKey);

    /**
     * 按部门获取待分配人员
     * @param deptId
     * @return
     */
    List<UserForAssignVO> listUserForAssign(Integer deptId);

    /**
     * 获取招标项目团队成员
     * @param projectTenderingCode  招标项目编号
     * @return
     */
    List<ProjectMemberVO> listMember(String projectTenderingCode);

    List<ProjectTeam> listByProjectCode(String projectTenderingCode);

    List<ProjectTeam> listByProjectCode(@NotBlank String projectTenderingCode,
                                        List<Integer> projectRoleIds);
}
